package org.example.leetcode.core.service;

import org.example.leetcode.common.domain.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.leetcode.core.domain.SysResource;
import org.example.leetcode.core.dto.MenuResource;
import org.example.leetcode.core.dto.SysUserRegisterDto;
import org.example.leetcode.core.dto.SysUserTokenDto;
import org.example.leetcode.core.dto.UserInfoVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhc
 * @since 2024-02-18
 */
public interface SysUserService extends IService<SysUser> {

    SysUserTokenDto loginOrRegister(String type, String phone, String password);

    boolean checkFirstTimeLogin(String phone);

    String refreshToken(String phone);

    void register(SysUserRegisterDto sysUserRegisterDto);

    void setPassword(SysUserRegisterDto sysUserRegisterDto);

    List<MenuResource> getResource(String phone, String type);

    Boolean logout();

    UserInfoVo getUserInfo();

    Boolean saveDetail(SysUser sysUser);
}
